<?php
namespace createround;


class pk10{
	/*
	** 二维数组
	** $params 二维数组
	** 字段列表 必须包含
	** typeid 彩票种类（ssc,k3,Game,kl10f,pk10,keno,xy28）
	** playid 玩法标识
	** opencode 开奖号码
	** tzcode 投注号码
	*/
    function check($symbol){
        $arrs = self::$symbol();
        return $arrs;
    }
	//幸运飞艇
	function xyft (){
        $arr = array();
        $catime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));//今天开始时间戳
        $start_time = $catime + 3600 * 13 + 218;
        $end_time = $catime + 86400 + 3600 * 4;
        $count1 = date('Ymd') . '000';
        $day_round = 0;
        for ($i = $start_time; $i < $end_time; $i += 60 * 5) {
            $day_round += 1;
            $count1 += 1;
            $data = array(
                'lottery_id' => 3,
                'round' => $count1,
                'day_round' => $day_round,
                'start_time' => $i,
                'end_time' => $i + 60 * 5,
                'state' => 1,
                'create_time' => time()
            );
            $arr[] = $data;


        }

        return $arr;
    }


    //北京pk10

    function fh (){
        $arr = array();


        $round=744483;

        $date='2020-05-11';
        $today_date=date('Y-m-d');
        $datetime_start = new \DateTime($date);
        $datetime_end = new \DateTime($today_date);
        $days = $datetime_start->diff($datetime_end)->days;
        $round+=$days*44;
        $catime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));//今天开始时间戳
        $start_time = $catime+3600 * 9+60*8+28;
        $end_time = $catime + 86400;
        $count = 0;
        for($i = $start_time;$i < $end_time; $i += 60 * 20){
            if($count==44){
                break;
            }
            $round += 1;
            $count += 1;
            $data = array(
                'lottery_id' => 1,
                'round' => $round,
                'day_round' => $count,
                'start_time' => $i,
                'end_time' => $i + 60 * 20,
                'state' => 1,
                'create_time' => time()
            );

            $arr[] = $data;

        }
        return $arr;
    }


    //北京澳洲pk10

    function azpk (){
        $arr = array();


        $round=20691963;

        $date='2020-05-10';
        $today_date=date('Y-m-d');
        $datetime_start = new \DateTime($date);
        $datetime_end = new \DateTime($today_date);
        $days = $datetime_start->diff($datetime_end)->days;
        $round+=$days*288;
        $catime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));//今天开始时间戳
        $start_time = $catime+22*3600+28*60+7;
        $end_time = $start_time + 86430;
        $count = 0;
        for($i = $start_time;$i < $end_time; $i += 60 * 5){
            if($count==288){
                break;
            }
            $round += 1;
            $count += 1;
            $data = array(
                'lottery_id' => 22,
                'round' => $round,
                'day_round' => $count,
                'start_time' => $i,
                'end_time' => $i + 60 * 5,
                'state' => 1,
                'create_time' => time()
            );

            $arr[] = $data;

        }
        return $arr;
    }






}
?>